import Main from '@/components/main'
import parentView from '@/components/parent-view'

/**
 * iview-admin中meta除了原生参数外可配置的参数:
 * meta: {
 *  hideInMenu: (false) 设为true后在左侧菜单不会显示该页面选项
 *  notCache: (false) 设为true后页面不会缓存
 *  access: (null) 可访问该页面的权限数组，当前路由设置的权限会影响子路由
 *  icon: (-) 该页面在左侧菜单、面包屑和标签导航处显示的图标，如果是自定义图标，需要在图标名称前加下划线'_'
 *  beforeCloseName: (-) 设置该字段，则在关闭当前tab页时会去'@/router/before-close.js'里寻找该字段名对应的方法，作为关闭前的钩子函数
 * }
 */

export default [{
		path: '/login',
		name: 'login',
		meta: {
			title: 'Login - 登录',
			hideInMenu: true
		},
		component: () =>
			import('@/view/login/login.vue')
	},
	{
		path: '/',
		name: '_home',  
		redirect: '/home',
		component: Main,
		meta: {
			hideInMenu: true,
			notCache: true
		},
		children: [{
			path: '/home',
			name: 'home',
			meta: {
				hideInMenu: true,
				title: '首页',
				notCache: true
			},
			component: () =>
				import('@/view/single-page/home')
		}]
	},
	{
		path: '/home',
		name: 'gcash_index',
		meta: {
			title: '提现申请',
			hideInMenu: true
		},
		component: () =>
			import('@/view/single-page/home/gcash_index.vue')
	},
	{
		path: '/home',
		name: 'bill_index',
		meta: {
			title: '账单明细',
			hideInMenu: true
		},
		component: () =>
			import('@/view/single-page/home/bill_index.vue')
	},
	{
		path: '/home',
		name: 'refund_index',
		meta: {
			title: '会员退款',
			hideInMenu: true
		},
		component: () =>
			import('@/view/single-page/home/refund_index.vue')
	},
	{
		path: '/home',
		name: 'message_index',
		meta: {
			title: '消息中心',
			hideInMenu: true
		},
		component: () =>
			import('@/view/single-page/home/message_index.vue')
	},
	{
		path: '/',
		name: '',
		meta: {
			title: '管理',
			icon: 'ios-book'
		},
		component: Main,
		children: [
		{
			path: '/order',
			name: 'order',
			meta: {
				title: '订单'
			},
			component: () =>
				import('@/view/order/index.vue')
		},
		{
			path: '/dot',
			name: 'dot',
			meta: {
				title: '网点'
			},
			component: () =>
				import('@/view/dot/index.vue')
		}, 
		{
			path: '/car',
			name: 'car',
			meta: {
				title: '车辆'
			},
			component: () =>
				import('@/view/car/index.vue')
		},
		{
			path: '/coupon',
			name: 'coupon',
			meta: {
				title: '优惠'
			},
			component: () =>
				import('@/view/coupon/index.vue')
		},
		{
			path: '/cusercar',
			name: 'cusercar',
			meta: {
				title: '车辆审核'
			},
			component: () =>
				import('@/view/cusercar/index.vue')
		},
		{
			path: '/user',
			name: 'user',
			meta: {
				title: '会员'
			},
			component: () =>
				import('@/view/user/index.vue')
		},
		{
			path: '/caruser',
			name: 'caruser',
			meta: {
				title: '车主'
			},
			component: () =>
				import('@/view/caruser/index.vue')
		},
		{
			path: '/break',
			name: 'break',
			meta: {
				title: '违章'
			},
			component: () =>
				import('@/view/break/index.vue')
		},
		{
			path: '/rule',
			name: 'rule',
			meta: {
				title: '费用设置'
			},
			component: () =>
				import('@/view/rule/index.vue')
		},
		{
			path: '/papply',
			name: 'papply',
			meta: {
				title: '会员担保审核'
			},
			component: () =>
				import('@/view/papply/index.vue')
		},
		{
			path: '/apply',
			name: 'apply',
			meta: {
				title: '担保用车申请'
			},
			component: () =>
				import('@/view/apply/index.vue')
		},
		]
	},
]